package android.slc.box.mp.base.entity;


import android.slc.box.mp.base.entity.i.IFileProperty;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ExtensionFileProperty implements IFileProperty {
    private List<String> extension;

    public static ExtensionFileProperty getWordFileProperty() {
        List<String> extension = new ArrayList<>();
        extension.add(".doc");
        extension.add(".docx");
        return getInstance(extension);
    }

    public static ExtensionFileProperty getExcelFileProperty() {
        List<String> extension = new ArrayList<>();
        extension.add(".xls");
        extension.add(".xlsx");
        return getInstance(extension);
    }

    public static ExtensionFileProperty getPowerPointFileProperty() {
        List<String> extension = new ArrayList<>();
        extension.add(".ppt");
        extension.add(".pptx");
        return getInstance(extension);
    }

    public static ExtensionFileProperty getPdfFileProperty() {
        List<String> extension = new ArrayList<>();
        extension.add(".pdf");
        return getInstance(extension);
    }

    public static ExtensionFileProperty getApkFileProperty() {
        List<String> extension = new ArrayList<>();
        extension.add(".apk");
        return getInstance(extension);
    }

    public static ExtensionFileProperty getInstance(List<String> extension) {
        return new ExtensionFileProperty(extension);
    }

    public static ExtensionFileProperty getInstance(String... extension) {
        return new ExtensionFileProperty(Arrays.asList(extension));
    }

    public ExtensionFileProperty(List<String> extension) {
        this.extension = extension;
    }

}
